Fix off-by-one preventing the last elfnote from being read in xc.c.
authorkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Wed, 28 Feb 2007 09:38:14 +0000 (09:38 +0000)
committerkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Wed, 28 Feb 2007 09:38:14 +0000 (09:38 +0000)
Signed-off-by: Brendan Cully <brendan@cs.ubc.ca>
tools/python/xen/lowlevel/xc/xc.c

index f4f3c47f3b86fbe5af41c9fb291182713fd3f1fa..31853538c489402ee94b5359395b07aec954c7ec 100644 (file)
@@ -411,7 +411,7 @@ static PyObject *pyxc_linux_build(XcObject *self,
 
     if (!(elfnote_dict = PyDict_New()))
        goto out;
-    for (i = 0; i < XEN_ELFNOTE_MAX; i++) {
+    for (i = 0; i <= XEN_ELFNOTE_MAX; i++) {
        switch (dom->parms.elf_notes[i].type) {
        case XEN_ENT_NONE:
            continue;